package controller

import (
	"github.com/gin-gonic/gin"
	"net/http"
	"strconv"
	"testGin/entity"
	"testGin/tool"
)

func AddShare(c *gin.Context) {
	u_v := entity.GetUserVideoCollectLoveUpload(c)
	if u_v.Vid <= 0 {
		c.JSON(http.StatusOK, tool.R{
			403, "请求参数错误", nil,
		})
		return
	}
	GetRedisConn().Do("incr", "S:"+strconv.Itoa(u_v.Vid))
	c.JSON(http.StatusOK, tool.R{
		200, "ok", nil,
	})
}
